package com.glasses.pandora.rest;

import com.glasses.pandora.domain.Version;
import com.glasses.pandora.service.ReportService;
import com.glasses.pandora.service.VersionService;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 *
 * @author Jean-Luc Burot
 * @since 2014-09-30
 */
@Path("")
@Produces(MediaType.APPLICATION_JSON)
public class VersionResource {
    @Inject
    private VersionService vs;
    
    @Inject
    private ReportService rs;
    
    @GET
    public Response getVersion() {
        final Version version = vs.getVersion();
        
        return Response.ok(version)
                       .build();
    }
}
